﻿using Microsoft.Xna.Framework;

namespace GameName1
{
    class GameStateRunning : GameState
    {
        private double _time;
        public override void Update(GameplayScene game, GameTime gameTime)
        {                       
            game.UpdateObjects(gameTime);

            game.CheckCollision(gameTime);
            game.DestroyByBoundary();

            if (GameplayScene.Lives == 0)
                ScreenManager.GetInstance().CurrentScreen = new GameOverScene(GameplayScene.Points);

            if (GameObjectsManager.GetInstance().GetAllObjectsOfType<AngryAlien>().Count == 0) GameplayScene.GameState = new GameStateInterlude(gameTime);
        }
    }
}
